from selenium.webdriver.common.by import By

from Base.Base import Base
class Page(Base):
    djlogin_loc=(By.XPATH,'//*[@id="app"]/div/section/aside/ul/li/ul/li[4]/a')
    def djlogin(self):
        self.click(self.djlogin_loc)
    username_loc=(By.XPATH,'/html/body/div/div/section/section/main/div[1]/div[2]/div[1]/div/input')
    def username(self,useername):
        self.send_keys(self.username_loc,useername)
    password_loc=(By.XPATH,'/html/body/div/div/section/section/main/div[1]/div[2]/div[2]/div/input')
    def password(self,password):
        self.send_keys(self.password_loc,password)
    djtj_loc=(By.XPATH,'/html/body/div/div/section/section/main/div[1]/div[2]/button[2]')
    def djtj(self):
        self.click(self.djtj_loc)
    queren_loc=(By.XPATH,'/html/body/div/div/section/section/main/div[2]/div/div/div/div[2]/button[2]/span')
    def queren(self):
        self.click(self.queren_loc)
    djlist_loc=(By.XPATH,'/html/body/div[1]/div/section/aside/ul/li/ul/li[5]/a')
    def djlist(self):
        self.click(self.djlist_loc)
    shu1list_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/div/div/div/input')
    def shu1list(self,shu1list):
        self.send_keys(self.shu1list_loc,shu1list)
    shu2list_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[2]/div/div/div/input')
    def shu2list(self, shu2list):
        self.send_keys(self.shu2list_loc, shu2list)
    djsou_loc=(By.XPATH,'//*[@id="app"]/div/section/section/main/div[5]/div/div/button[1]/span')
    def djsou(self):
        self.click(self.djsou_loc)

    xm_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/label')
    def xm(self):
       return self.by(self.xm_loc)